package cn.ivicar.iov.controller;

import cn.ivicar.iov.service.IdentifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: iov
 * @description: ${description}
 * @author: Mr.Wang
 * @create: 2018-08-13 16:18
 **/
@RestController
public class IdentifyController {
    @Autowired
    private IdentifyService identifyService;


    @GetMapping(value = "/geticcidbyvehicleserial")
    public String getIccid(@RequestParam("vehicle_serial") String vehicle_serial){
        String iccid = identifyService.getIccid(vehicle_serial);
        return iccid;
    }
    @GetMapping(value = "/IsIdentify")
    public Boolean IsIdentify(@RequestParam("vehicle_serial") String vehicle_serial){
        identifyService.updateStatus(vehicle_serial);
        boolean isidentify = identifyService.IsIdentify(vehicle_serial);
        return isidentify;
    }
}
